package com.nami.store.biz.conver.service;

import com.nami.store.api.request.conversation.ConverItem;
import com.nami.store.api.request.conversation.ConverPageReq;
import com.nami.store.api.response.conversation.ConversationDTO;
import com.nami.store.api.response.conversation.ConverDetailVO;
import com.nami.store.domain.ConversationDO;
import org.dromara.common.mybatis.core.page.TableDataInfo;

import java.util.List;

public interface ConverDomainService {

    ConversationDTO getConverFromCacheOrDB(String appKey, String userId, String targetId);

    boolean batchSave(List<ConversationDO> convers);

    boolean insertOrUpd(ConversationDO conver);

    List<ConversationDTO> getConversFromCacheOrDB(String appKey, List<String> userIds, String targetId);

    boolean batchUpdConvers(List<ConverItem> itemList);

    TableDataInfo<ConverDetailVO> getConvers(ConverPageReq request);

    ConverItem getConverFromCache(String appKey, String userId, String targetId);
}
